package com.sfchen.cloud.feign.service;

import com.sfchen.cloud.dto.UserDto;
import com.sfchen.cloud.feign.service.impl.UserFeignDetailServiceLocalImpl;
import com.sfchen.cloud.utils.JsonData;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;

@FeignClient(name = "db-server", fallback = UserFeignDetailServiceLocalImpl.class)
public interface UserFeignDetailService {

    @GetMapping("db/feign/user/{userId}")
    JsonData<UserDto> queryUserDetailById(@PathVariable("userId") Integer userId);
}
